cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_STANDARD 11)

IF (APPLE)
find_package(OpenCV 3 REQUIRED)
ELSEIF (UNIX)
set(OpenCV_DIR /usr/local/opencv-4.0.0/lib/cmake/opencv4/)
find_package(OpenCV  REQUIRED)
ENDIF ()

include_directories(
    /usr/local/include
)
link_directories(
    /usr/local/lib
    ${INC_DIRS}
)
add_executable(rtmp-stream-pusher myrtspstreamer.cpp)
target_link_libraries(rtmp-stream-pusher  ${OpenCV_LIBS}

#-Wl,--start-group
avcodec  avdevice  avfilter  avformat  avutil
swscale swresample iconv z dl lzma
#-Wl,--end-group
pthread
)

install(TARGETS rtmp-stream-pusher DESTINATION bin)
